package it.uniroma2.art.coda.projectionrule;

import java.util.Map;

import org.apache.uima.jcas.tcas.Annotation;

import it.uniroma2.art.coda.core.CODACore;
import it.uniroma2.art.coda.exception.PRParserException;
import it.uniroma2.art.coda.interfaces.CODAExtensionInterface;

/**
 * @author Andrea Turbati
 */

public abstract class ParserPR extends CODAExtensionInterface {
	// protected ProjectionRulesModel prModel = null;
	protected String prFilePath = null;
	protected CODACore codaCore = null;

	public ParserPR(String id, String description) {
		super(id, description);
	}

	public void initialize(ProjectionRulesModel prModel, String prFilePath, CODACore codaCore) {
		this.prModel = prModel;
		this.prFilePath = prFilePath;
		this.codaCore = codaCore;
	}

	abstract public ProjectionRulesModel parsePR() throws PRParserException;

	abstract public boolean checkCondition(IfElseStruct ifElse,
			Map<PlaceholderStruct, String> placeholderAliasToValueMap, Annotation ann);
}
